#include "junix.h"

#define OFFSET(t, m) (int)&(((t*)0)->m)

struct A
{
  int i;
  int j;
  char c;
  char c2;
  short st;
};

int
main(int argc, char **argv)
{
  printf("offset i:%d\n",OFFSET(struct A,i));
  printf("offset j:%d\n",OFFSET(struct A,j));
  printf("offset c:%d\n",OFFSET(struct A,c));
  printf("offset c2:%d\n",OFFSET(struct A,c2));
  printf("offset st:%d\n",OFFSET(struct A,st));
 
  exit(0);
}
